home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / gl_dev.idb / usr / include / gl / objectgl.h.z / objectgl.h
Encoding:
C/C++ Source or Header  |  1996-12-06  |  3.1 KB  |  111 lines

  1. #ifndef __GL_OBJECTGL_H__
  2. #define __GL_OBJECTGL_H__
  3. /**************************************************************************
  4.  *                                      *
  5.  *          Copyright (C) 1984, Silicon Graphics, Inc.          *
  6.  *                                      *
  7.  *  These coded instructions, statements, and computer programs  contain  *
  8.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  9.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  10.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  11.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  12.  *                                      *
  13.  **************************************************************************/
  14.  
  15. #include "dlpers.h"
  16.  
  17.  
  18. /*
  19.  *  object constants
  20.  */
  21.  
  22. #define INITOBJCHUNKSIZE    1020
  23. #define HASHTABLESIZE         256        /* must be a power of 2 */
  24.  
  25. #ifdef    SHLIBGL
  26. #define    GL_BRANCH_TABLE_SDL_CDL       1        /* separates in DL criticals in DL */
  27. #define    GL_BRANCH_TABLE_SDL_CIM       2        /* separates in DL criticals in IM */
  28. #define    GL_BRANCH_TABLE_SIM_CIM       3        /* separates in IM criticals in IM */
  29. #ifdef EXPRESS
  30. #define    GL_BRANCH_TABLE_CGL       4        /* criticals in CGL */
  31. #endif
  32. #endif    /* SHLIBGL */
  33.  
  34.  
  35. /* This flag is defined in dgl/initialize.c */
  36. #ifdef GLDSO
  37. extern int  gl_immediate_mode;
  38. #endif
  39.  
  40. /*
  41.  *  object typedefs
  42.  */
  43.  
  44. typedef struct cons {
  45.     struct cons    *link;
  46.     short    *item;
  47. } Cons;
  48.  
  49. typedef struct hashrec {
  50.     struct hashrec    *link;
  51.     short        *item;
  52.     Tag            tag;
  53.     Object        obj;
  54. } Hashrec;
  55.  
  56. typedef struct objhdr {
  57.     short    *head;        /* ptr to first valid chunk of disp list */
  58.     Cons    *chunks;    /* linked list of chunks of data */
  59.     long    datasize;    /* # shorts of real data */
  60.     long    physicalsize;    /* total physical shorts */
  61.     Cons    *tags;        /* list of tags */
  62.     short    *tailptr;    /* ptr to end of object */
  63.     short    *tailend;    /* end of last chunk */
  64.     int        valid;        /* == 0 ==> object deleted. */
  65. } Objhdr;
  66.  
  67. /*
  68.  *  object globals
  69.  */
  70.  
  71. #ifdef    SHLIBGL
  72. extern long              gl_branch_table_status;    /* Display list branch tab? */
  73. #endif    /* SHLIBGL */
  74. extern Boolean      gl_replacemode;
  75. extern Objelem      *gl_currentpos; /* -> next legal spot in cur chunk */
  76. extern Objelem      *gl_currentend; /* -> one past end of current chunk */
  77. extern struct objhdr     *gl_openobjhdr;
  78. extern Object       gl_openobj;
  79.  
  80. extern Hashrec    *gl_hashtable[HASHTABLESIZE];
  81. extern long    gl_objchunksize;
  82. extern short    gl_objsizefrozen;
  83.  
  84. extern Objhdr *gl_findobjhdr(Object n);
  85. extern Objhdr *gl_getnewobjhdr( Object obj );
  86. extern short *gl_addchunk( register char *caller);
  87.  
  88. extern void     gl_interpret(Objelem *);
  89. extern void    gl_load_branch_table( register long type );
  90. extern void    gl_intrptab_insert(struct intrprec *);
  91. extern void    gl_compile(int, Int32 *);
  92. extern short    *gl_findhash( register Object obj, register Tag tag);
  93.  
  94. extern Boolean gl_nonprim_checkspace( Int32 n );
  95.  
  96. #define gl_findobjhdr(n)    (Objhdr *)gl_findhash(n, -1)
  97.  
  98. DL_INTRP_FORW(retsym);
  99. DL_INTRP_FORW(jump);
  100. DL_INTRP_FORW(tag);
  101. DL_INTRP_FORW(nop);
  102. DL_INTRP_FORW(slopnop2);
  103. DL_INTRP_FORW(slopnop3);
  104. DL_INTRP_FORW(gl_ecallfunc);
  105. DL_INTRP_FORW(nonprim);
  106. DL_INTRP_FORW(quad_nop1);
  107. DL_INTRP_FORW(quad_nop2);
  108. DL_INTRP_FORW(quad_nop3);
  109.  
  110. #endif    /* !__GL_OBJECTGL_H__ */
  111.